package com.jiejie.controller;

import com.jiejie.service.OrderByService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class OrderByController {
    @Autowired
    private OrderByService orderByService;

    @GetMapping("orderby")
    public ModelAndView OrderBy(){
        System.out.println("严磊真帅");
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("OrderBy",orderByService.OrderBy());
        modelAndView.setViewName("pages/BangDan");
        return modelAndView;
    }
}
